package com.ay272.ssh2.base.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;

import org.springframework.stereotype.Component;

/**
 * Created by java on 2016/5/19.
 */
@Component
@Aspect
public class MyLog {
    //@Before(value = "execution(* com.ay272.ssh2..biz.*.*(..))")
    @Around(value ="execution(* com.ay272.ssh2..biz.*.*(..))")
    public Object huan(ProceedingJoinPoint pj) throws Throwable {
        System.out.println(pj.getTarget());
        System.out.println(pj.getSignature().getName());
        System.out.println("开始执行了");
        Object o =pj.proceed();
        System.out.println("结束了");
        return o;

    }
}
